package org.qydjk.common.pojo;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * SUser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "s_user", catalog = "qydjk", uniqueConstraints = @UniqueConstraint(columnNames = "login_name"))
public class SUser implements java.io.Serializable {
	private static final long serialVersionUID = 2329543103861676500L;
	private Integer id;
	private String loginName;
	private String name;
	private String password;
	private String salt;
	private Integer sex;
	private Integer age;
	private String phone;
	private Integer userType;
	private Integer status;
	private Integer organizationId;
	private Date createTime;

	// Constructors

	/** default constructor */
	public SUser() {
	}

	/** minimal constructor */
	public SUser(String loginName, String name, String password, Integer sex,
			Integer userType, Integer status, Integer organizationId,
				 Date createTime) {
		this.loginName = loginName;
		this.name = name;
		this.password = password;
		this.sex = sex;
		this.userType = userType;
		this.status = status;
		this.organizationId = organizationId;
		this.createTime = createTime;
	}

	/** full constructor */
	public SUser(String loginName, String name, String password, String salt,
			Integer sex, Integer age, String phone, Integer userType,
			Integer status, Integer organizationId, Date createTime) {
		this.loginName = loginName;
		this.name = name;
		this.password = password;
		this.salt = salt;
		this.sex = sex;
		this.age = age;
		this.phone = phone;
		this.userType = userType;
		this.status = status;
		this.organizationId = organizationId;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "login_name", unique = true, nullable = false, length = 64)
	public String getLoginName() {
		return this.loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	@Column(name = "name", nullable = false, length = 64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "password", nullable = false, length = 64)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "salt", length = 36)
	public String getSalt() {
		return this.salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	@Column(name = "sex", nullable = false)
	public Integer getSex() {
		return this.sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	@Column(name = "age")
	public Integer getAge() {
		return this.age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	@Column(name = "phone", length = 20)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "user_type", nullable = false)
	public Integer getUserType() {
		return this.userType;
	}

	public void setUserType(Integer userType) {
		this.userType = userType;
	}

	@Column(name = "status", nullable = false)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "organization_id", nullable = false)
	public Integer getOrganizationId() {
		return this.organizationId;
	}

	public void setOrganizationId(Integer organizationId) {
		this.organizationId = organizationId;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}